package seentao.stdev.mobile.io.vo;

import lombok.Data;

@Data
public class UrlFile {
	private String id;
	private String name;
	private String url;
	private String mime;
	private String icon;
	
	public String getText() {
		int lastDot = name.lastIndexOf('.');
		return lastDot>=0 ? name.substring(0, lastDot) : name;
	}
	
	public String getExtName() {
		int lastDot = name.lastIndexOf('.');
		return lastDot>=0 ? name.substring(lastDot + 1) : "";
	}
	
}